import { appName } from '@/utils/global'
export default {
    state: {
        appName: appName, // 应用名称
        showScreen: false, // 是否显示遮挡屏
        device: 'desktop', // 当前设备的类型
        deviceWidth: 1440, // 当前浏览器的宽度
        routerWidth: 1440,
        isMobile: false, // 当前
        showDialog: false, // 是否显示弹框
        breadcrumbData: [], // 是否显示弹框
        registerInfo: null // 注册信息
    },
    getters: {
        SET_SCREEN_STATE(state) { // 对应着上面state
            return state.showScreen
        },
        SET_DEVICE(state) { // 对应着上面state
            return state.device
        },
        SET_DEVICE_WIDTH(state) { // 对应着上面state
            return state.deviceWidth
        },
        SET_ROUTER_WIDTH(state) { // 对应着上面state
            return state.routerWidth
        },
        SET_MOBILE_STATE(state) { // 对应着上面state
            return state.isMobile
        },
        SET_DIALOG_STATE(state) { // 对应着上面state
            return state.showDialog
        },
        SET_BREADCRUB_DATA(state) { // 对应着上面state
            return state.breadcrumbData
        },
        SET_REGISTER_INFO(state) { // 对应着上面state
            return state.registerInfo
        }
    },
    mutations: {
        SET_SCREEN_STATE(state, showScreen) {
            state.showScreen = showScreen
        },
        SET_DEVICE(state, device) {
            state.device = device
        },
        SET_DEVICE_WIDTH(state, deviceWidth) {
            state.deviceWidth = deviceWidth
        },
        SET_ROUTER_WIDTH(state, routerWidth) {
            state.routerWidth = routerWidth
        },
        SET_MOBILE_STATE(state, isMobile) {
            state.isMobile = isMobile
        },
        SET_DIALOG_STATE(state, showDialog) {
            state.showDialog = showDialog
        },
        SET_BREADCRUB_DATA(state, breadcrumbData) {
            state.breadcrumbData = breadcrumbData
        },
        SET_REGISTER_INFO(state, registerInfo) { // 对应着上面state
            state.registerInfo = registerInfo
        }
    },
    actions: {}
}